<include file="../header" />
<body class="J_scroll_fixed">

<style type="text/css">
    .btn-danger,.btn-info,.btn-success,.btn-warning{
        width: 60px;
        /*height: 18px;*/
        padding: 2px 0px 2px 0px;
        margin: 1px 0px 1px 0px;
    }
</style>
<script language="javascript" src="/Template/js/ImgPreview.js"></script>
<script type="text/javascript">
    function del(id, name) {
        if (!confirm("是否删除供应商【" + name + "】")) {
            return false;
        }
        var url = "/admin/Supplier/remove?id=" + id;
        window.location.href = url;
    }
</script>
<form class="well form-search" method="post" style="float:left;width:100%;" action="{:U('Supplier/index')}">
    <div class="search_type cc mb10">
        <div class="mb10">
        <span class="mr20">
            名称：<input type="text" name="sp#supplier_name-like" value="{$supplier_name}" />
            经营产品：<input type="text" name="sp#product-like" value="{$product}" />
            <button class="btn btn-primary">搜索</button>
            <a class="btn" href="{:U('Supplier/index')}">重置</a>
        </span>
        </div>
    </div>
</form>
<div class="wrap J_check_wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:U('Supplier/index')}">供应商列表</a></li>
        <li><a href="{:U('Supplier/add')}">新增供应商</a></li>
    </ul>
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th style="min-width: 50px; width: 50px">营业执照</th>
            <th style="min-width: 200px; width: 200px">名称</th>
            <th style="min-width: 200px; width: 200px">电话、地址</th>
            <th style="min-width: 200px; width: 200px">联系人</th>
            <th style="min-width: 200px; width: 200px">银行信息</th>
            <th style="min-width: 200px; width: 200px">经营产品</th>
            <th style="min-width: 250px; width: 250px">备注</th>
            <th style="min-width: 70px; width: 70px">操作</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="list" item="vo">
            <tr>
                <td>
                    <div class="container-item">
                        <img src="{$vo.license_img}" style="cursor: pointer;">
                    </div>
                </td>
                <!--<td><img src="{$vo.license_img}" /></td>-->
                <td>{$vo.supplier_name}</td>
                <td>{$vo.mobile}<br/>{$vo.address}</td>
                <td style="white-space: pre-wrap">{$vo.contact}</td>
                <td style="white-space: pre-wrap">{$vo.bank_info}</td>
                <td style="white-space: pre-wrap">{$vo.product}</td>
                <td style="white-space: pre-wrap">{$vo.remark}</td>
                <td>
                    <a class="btn btn-info" href='{:U("Supplier/edit",array("id"=>$vo["supplier_id"]))}'>修改</a>
                    <br/>
                    <a class="btn btn-danger" onclick='javascript:del("{$vo.supplier_id}","{$vo.supplier_name}",0)'>删除</a>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination">{$page}</div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>